package com.xgkj.diyiketang.activity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;

import com.xgkj.diyiketang.R;
import com.xgkj.diyiketang.util.ImageCache;
import com.xgkj.diyiketang.util.ViewUtil;

/**
 * Created by Administrater on 2015/12/27.
 */
public class DaShangActivity extends BaseActivity {
    private Context mContext;
    private String mUserLogo;
    private String mNick;
    private String mSign;
    private String mVidoeIns;
    private String mVideoDate;

    private ImageView userLogo;
    private TextView nick;
    private TextView sign;
    private TextView ins;
    private TextView date;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dashang);
        mContext = this;
        Intent intent = getIntent();
        mUserLogo = intent.getStringExtra("LOGO");
        mNick = intent.getStringExtra("NICK");
        mSign = intent.getStringExtra("SIGN");
        mVidoeIns = intent.getStringExtra("INST");
        mVideoDate =  intent.getStringExtra("TIME");
        initView();

    }

    private void initView(){
        userLogo = (ImageView) findViewById(R.id.user_head_image);
        nick = (TextView) findViewById(R.id.user_name);
        sign = (TextView) findViewById(R.id.user_sign);
        ins = (TextView) findViewById(R.id.inst);
        date = (TextView) findViewById(R.id.dashang_date);

        ImageCache.getInstance(mContext).loadBitmapToView(userLogo,mUserLogo,ViewUtil.getHeadImageSize(mContext));
        nick.setText(mNick);
        sign.setText(mSign);
        ins.setText(mVidoeIns);
        date.setText(mVideoDate);
    }
}
